1. Field of the Invention
This invention relates in general to object-oriented programming systems, and in particular, to a method for relating the execution behavior of object models to their class models using reference-based associations.
2. Description of Related Art
OOAD (Object-Oriented Analysis and Design) is gaining popularity in the marketplace. As a result, a number of different vendors provide Object Modeling Tools that support specific OOAD methods.
The concept of an association is central to almost all OOAD methods. Associations in OOAD notations are simple diagrammatic annotations to capture the intention of the modeler as to possible knowledge of one class from another. However, usually association is used simply as a diagrammatic annotation between classes, and has no significance in the final running application that is being modeled. For example, an association in the diagrammatic notation may translate either as a method invocation of one class instance by an instance of the other, or it may stand for an instance of a class sending an instance of another as an argument to a method call on a third object.
Association in such cases, signifies that the class at one end has a knowledge of (or in some way uses) information provided by the class at the other end, without being specific as to what kind of knowledge this is, and how the knowledge is reflected in the final application being modeled. Therefore, there are several possible interpretations that could be attributed to such annotations.
The present invention alleviates these problems and provides a different type of reference-based association using a notation that provides exact semantic meaning in the context of the application being modeled. This form of association is also directly reflected in the execution behavior of the application being modeled. Furthermore, in this perspective, the present invention maintains consistency between the objects and the classes to provide an exact execution behavior of objects (instances) when their types (classes) have been related using reference-based associations. Furthermore, the present invention provides a way to generate source code from such a construct (in a programming language such as C++/Java, etc.), such that the behavior of the generated code is consistent with the semantic meaning of reference-based associations.